<?php include DIR_MODULES . 'menu/menu_main_news.php'; ?>

<table cellpadding="0" cellspacing="0" width="960px" border="0"
	align="center">
	<tr>
		<td id="coloana_dreapta_root_corp" valign="top">
			<!-- mijloc si dreapta //////////////////////////////////// --> 
			<?php
			$test = mysql_query("select * from dt_mod_visible where z_id = '2' and visible = '1' and p_id = '1' order by `order`");
			//daca nu exista nici un rezultat atunci ascunde coloana
			if (mysql_num_rows($test)>0){
				echo '<table cellpadding="0" cellspacing="0" width="100%" border="0">';
			} else {
				echo '<table cellpadding="0" cellspacing="0" width="950px" border="0">';
			}
			?>
	<tr>
		<td id="content_corp" valign="top">
		<?php
		//$breadcrumbs = mysql_query("select * from dt_categories where c_id = '".$_GET['cid']."'");
		//$breadcrumb = mysql_fetch_array($breadcrumbs);
		//echo '<b>'.$breadcrumb['c_title'].'</b>';
		echo '<div class="crumbs">News</div>';
		?>
			<div class="mijloc_hr">&nbsp;</div> <!-- galerie media //////////////////////////////////////// -->
			<?php include DIR_MODULES . 'galerie_header/index.php';?> <?php
			$data = mysql_query("select * from dt_news where news_id = '".$_GET['id']."'");
			while ($row = mysql_fetch_array($data)){
				$checkQuery = mysql_query("select * from dt_news_images where n_id = '".$_GET['id']."'");
				//$checkRow = mysql_fetch_array($checkQuery);
				
				if(mysql_num_rows($checkQuery)<1)
					echo '<div class="custom_h1">'.$row['news_title'].'</div>';
			}
			?> <img src="../../templates/default/images/tag-share.png" width=""
			height="25" align="absmiddle" alt="share" /> <a
			href="http://www.facebook.com/share.php?u=<?php echo 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]?>">
				<img align="absmiddle"
				src="../../templates/default/images/icon-facebook-mic.png" alt="" />
		</a> <a href="http://twitter.com/share"
			data-url="<?php echo 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]?>"
			data-count="none"> <img
				src="../../templates/default/images/icon-twitter-mic.png" width="25"
				height="25" align="absmiddle" alt="tweet" /> </a> <script
				type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
			&nbsp;&nbsp; <img src="../../templates/default/images/tag-email.png"
			width="" height="25" align="absmiddle" alt="e-mail" /> <a
			href="#emailpopup" class="email" id="email"><img
				src="../../templates/default/images/icon-mail-mic.png" width="25"
				height="25" align="absmiddle" alt="" /> </a> <img
			src="../../templates/default/images/tag-print.png" width=""
			height="25" align="absmiddle" alt="print" /> <a
			href="javascript:window:print()"><img
				src="../../templates/default/images/icon-print-mic.png" width="25"
				height="25" align="absmiddle" alt="" /> </a>


			<style type="text/css">
#tellfriend {
	position: absolute;
	margin-top: -300px;
	left: 400px;
	color: #fff;
	padding: 15px;
	margin-bottom: 20px;
	width: 380px;
	z-index: 1;
	border: 1px solid #ccc;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	background-color: #f2f2f2;
}

#tellfriend a.close {
	position: absolute;
	right: -10px;
	top: -10px;
	background: url(../../templates/default/images/fancy_closebox.png)
		no-repeat;
	height: 30px;
	width: 30px;
	overflow: hidden;
	text-indent: -1000px;
}

#tellfriend form textarea {
	height: 80px;
}

.contact-form {
	padding: 15px;
	margin-bottom: 20px;
	border: 1px solid #ccc;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	background-color: #f2f2f2;
}

.contact-form form input.std_input {
	margin-bottom: 10px;
}

form label.clear {
	clear: both;
	float: left;
	margin-top: 10px;
}

form label.full {
	width: 99%;
}

form label.required {
	font-weight: bold;
}

form select {
	margin-bottom: 10px;
	background-color: #fff;
	border: 1px solid #ccc;
	font: 14px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	color: #6e6e6e;
}

form label {
	color: #808080;
	font-size: 14px;
}

form input.std_input,form textarea {
	border: 1px solid #ccc;
	width: 97%;
	font: 15px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	padding: 5px;
	color: #6e6e6e;
}

form table {
	width: 100%;
}

form table input.std_input {
	width: 93%;
}

form table.three-col input.std_input {
	width: 90%;
}

form input.form_but {
	margin-top: 10px;
	background-color: #93ba31;
	border: 3px solid #afdd39;
	color: #fff;
	font: bold 15px "Helvetica Neue", Arial, Helvetica, Geneva, sans-serif;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	padding: 5px 10px;
}
</style>


			<div id="tellfriend" class="contact_form" align="left">
				<a class="close" href="#close">Close</a>
				<form id='tellafriend_form' method="post"
					action="../../modules/offers/send.php">

					<label for="from">Your Email: </label> <input class="std_input"
						type="text" id="from" name="from" size="40" maxlength="35"
						value="" /> <label for="name">Your Name: </label> <input
						class="std_input" type="text" id="name" name="name" size="40"
						maxlength="35" value="" /> <label for="to">To: </label> <input
						class="std_input" type="text" id="to" name="to" size="40"
						maxlength="35" /> <label for="subject">Subject: </label> <input
						class="std_input" type="text" id="subject" name="subject"
						size="40" value="" /> <label for="message">Message: </label>
					<textarea id="message" name="message" readonly="readonly" rows="18"
						cols="40">
						<?php echo 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]?>
     </textarea>
     <input type="hidden" name="path" value="<?php echo 'http://'.$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]?>" />

					<input type="submit" name="submit" class="form_but" value="Submit"
						id="submit_btn" />
				</form>
			</div> <script type="text/javascript">
    jQuery.fn.fadeToggle = function(speed, easing, callback) {
    return this.animate({opacity: 'toggle'}, speed, easing, callback);
    };

    $(document).ready(function() {
        $('#tellfriend').hide();
        $('#email, #tellfriend a.close').click(function() {
        $("#tellfriend").fadeToggle('slow');
      });
    });
</script> <!-- end galerie media //////////////////////////////////// -->
			<!-- <div class="mijloc_hr">&nbsp;</div> --> <!-- articole mijloc /////////////////////////////////////// -->
			<div class="mijloc_root">
			<?php
			$data = mysql_query("select * from dt_news where news_id = '".$_GET['id']."'");
			while ($row = mysql_fetch_array($data)){
				//echo '<div class="custom_h1">'.$row['news_title'].'</div>';
				echo '<div class="general_text" style="border-bottom:none;">'.$row['news_content'].'</div>';
			}
			?>
				<div class="mijloc_hr">&nbsp;</div>
				<?php
				$douastiri = mysql_query("select * from dt_news where news_visible = '1' and news_id != '".$_GET['id']."' order by news_id desc limit 0,2");
				while ($stiriRow = mysql_fetch_array($douastiri)){
					echo '<a href="../../news/'.$stiriRow['news_id'].'/'.cleanitup($stiriRow['news_title']).'.html">'.$stiriRow['news_title'].'</a><br />';
				}
				?>
			</div> <!-- end articole mijloc /////////////////////////////////// -->
		</td>
		<td class="coloana_separator" valign="top">&nbsp;</td>
		<?php
		$cDreapta = mysql_query("select * from dt_mod_visible
								where z_id = '2'
								and visible = '1'
								and p_id = '1'
								order by `order`");
		//daca nu exista nici un rezultat atunci ascunde coloana
		if (mysql_num_rows($cDreapta)>0){
			?>
		<td id="content_dreapta" valign="top">
			<!-- content dreapta ////////////////////////////////////// --> 
			<?php include DIR_MODULES . 'coloane_module/coloana_dreapta.php'; ?>
			<!-- end content dreapta ////////////////////////////////// -->
		</td>
		<?php }?>
	</tr>
</table>
<!-- end mijloc si dreapta //////////////////////////////// -->
</td>
</tr>
</table>
